# project(process) 最底层的目录没必要写project

add_library(process SHARED)

target_sources(process
    PRIVATE
        ${CMAKE_CURRENT_SOURCE_DIR}/process.cpp
)

target_link_libraries(process
    PRIVATE
        pnc_map
)
# process依赖pnc_map, real_project_main依赖process

target_include_directories(process
    PUBLIC
        ${CMAKE_CURRENT_SOURCE_DIR}/../pnc_map
        ${CMAKE_CURRENT_SOURCE_DIR}
    # 默认情况下，CMake会自动将当前源文件目录（即`CMAKE_CURRENT_SOURCE_DIR`）添加到process的包含路径中。因此，如果process.cpp和process.h和本CMakeLists.txt在同一个目录下，通常不需要手动添加target_include_directories(process ${CMAKE_CURRENT_SOURCE_DIR}), 但是这种默认添加方式是PRIVATE的, 也就是说如果有target引用process, 那么该target无法看到process.h, 所以需要PUBLIC显式的包含${CMAKE_CURRENT_SOURCE_DIR}
)
# public 自己可见, 引用自己的target也可见